Q: Which scheme uses a randomization approach?
Solution: Universal hashing scheme uses a randomization approach whereas hashing by division and hashing by multiplication are heuristic in nature.
Q: Which hash function satisfies the condition of simple uniform hashing?
Solution: If the keys are known to be random real numbers k independently and uniformly distributed in the range 0<=k<=1, the hash function which satisfies the condition of simple uniform hashing is h(k)= lowerbound(km).
Q: Interpret the given character string as an integer expressed in suitable radix notation. Character string = pt
Solution: The given character string can be interpreted as (112,116) (Ascii values) then expressed as a radix-128 integer, hence the value is 112*128 + 116 = 14452.
Q: What is the hash function used in the division method?
Solution: In division method for creating hash functions, k keys are mapped into one of m slots by taking the reminder of k divided by m.
Q: What can be the value of m in the division method?
Solution: A prime number not too close to an exact power of 2 is often a good choice for m since it reduces the number of collisions which are likely to occur.
Q: Which scheme provides good performance?
Solution: Universal hashing scheme provides better performance than other schemes because it uses a unique randomisation approach.
Q: Using division method, in a given hash table of size 157, the key of value 172 be placed at position ____
Solution: The key 172 can be placed at position 15 by using the formula H(k) = k mod m H(k) = 172 mod 157 H(k) = 15.
Q: How many steps are involved in creating a hash function using a multiplication method?
Solution: In multiplication method 2 steps are involved. First multiplying the key value by a constant. Then multiplying this value by m.
Q: What is the hash function used in multiplication method?
Solution: The hash function can be computed by multiplying m with the fractional part of kA (kA mod 1) and then computing the floor value of the result.
Q: What is the advantage of the multiplication method?
Solution: The value of m can be simply in powers of 2 since we can easily implement the function in most computers. m=2p where p is an integer.
You Have Score    | /10 |